utoipa-config
This crate provides global configuration capabilities for utoipa
.
Config options
- Define rust type aliases for
utoipa
with.alias_for(...)
method. - Define schema collect mode for
utoipa
with.schema_collect(...)
method.SchemaCollect:All
will collect all schemas from usages including inlined withinline(T)
SchemaCollect::NonInlined
will only collect non inlined schemas from usages.
Install
Add dependency declaration to Cargo.toml
.
[]
= "0.1"
Examples
Create build.rs
file with following content, then in your code you can just use MyType
as
alternative for i32
.
use Config;
See full example for utoipa-config.
License
Licensed under either of Apache 2.0 or MIT license at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, shall be dual licensed, without any additional terms or conditions.